<p class="Head1"><help:link Id="66550">TimeValue Function [Runtime]</help:link></p>
<p class="Paragraph">Calculates a serial time value from the specified hour, minute, and second - parameters passed as strings - that represents the time in a single numeric value. This value can be used to calculate the difference between times.</p>
<p class="Paragraph">Text: Any string expression that contains the time to be calculated in the format "HH:MM:SS".</p>
<p class="Paragraph">With this function, you can convert any time into a single value, with which you can calculate time differences.</p>
<p class="Paragraph">The <span class="T1">TimeValue</span> function returns the type Variant with VarType 7 (Date); this value is stored internally as a double-precision number between 0 and 0.9999999999.</p>
<p class="Paragraph">As opposed to the <span class="T1">DateSerial</span> or <span class="T1">DateValue</span> function, in which serial date values are calculated resulting in days relative to a fixed date, you can calculate with values returned by the <span class="T1"><text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/>TimeValue</span> function, but you cannot evaluate them.</p>
<p class="Paragraph">In the <span class="T1">TimeSerial</span> function, you can pass the individual parameters (hour, minute, second) as separate numeric expressions. For the <span class="T1">TimeValue</span> function, however, you can pass a string as a parameter containing the time.</p>
<p class="P2">Example:</p>
<p class="PropText">Sub ExampleTimerValue</p>
<p class="PropText">Dim daDT as Date</p>
<p class="PropText">Dim a1, b1, c1, a2, b2, c2 as String</p>